<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <script src="../vue_lib/vue.js"></script>
    <title>Title</title>
</head>
<body>
<div id="app"
     class="myWord"
     v-bind:class="[isActive ? 'active':'',isGreen ? 'green':'']"
     style="width: 200px;height: 200px;text-align: center;line-height: 200px;">
    测试
    <div
            :style="{color : color, fontSize : size,background: isYellow ? '#F5FF55':'' }">
        内连样式
    </div>
</div>

<script>
    var vm = new Vue({
        el: "#app",
        data: {
            isActive: true,
            isGreen: true,
            color: '#FF0000',
            size: '50px',
            isYellow: true
        }

    })
</script>
<style>
    .active {
        background: red;
    }

    .green {
        color: #00FF00;
    }

    .myWord {
        font-size: 30px;
    }
</style>
</body>
</html>